@extends('layouts.homebase')
@section('tdk')
<title>{{$tdk['title']}}</title>
<meta name="keywords" content="{{$tdk['keywords']}}" />
<meta name="description" content="{{$tdk['description']}}" />
@endsection
@section('css')
@parent
<link rel="stylesheet" type="text/css" href="">
@endsection
@section('content')

<div class="row clearfix">
    <div class="col-md-8 column">
        <blockquote>
            <h1>{{$detail->title}}</h1>
            <small>{{$detail->catname}}  &nbsp/&nbsp  管理员 <cite> 发布于 {{format_date($detail->pubtime)}}</cite> &nbsp  <i class="icon ion-eye"></i> {{$detail->view}} </small>
        </blockquote>
        <dl>{!! $detail->content !!}</dl>

        <div class="h-clear"></div>
        <p class="h-block"><strong>请勿发布不友善或者负能量的内容。与人为善，比聪明更重要！</strong>
            <form class="h-block" method="post" action="comment" role="form">
                <div class="form-group">
                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                    <input type="hidden" name="art_id" value="{{ $detail->art_id }}">
                    <textarea name="comment" class="form-control" rows="3" style="overflow: hidden; overflow-wrap: break-word; resize: none;"></textarea>{{--<font class="help-block">留言需注册</font>--}}
                </div>
                <button type="submit" class="btn btn-default">评论</button>
            </form>
        </p>
        <div class="h-clear"></div>

        @foreach($comments as $one)
        <div class="media h-block">
            <a href="#" class="pull-left"><img src="/storage/{{$one['face']}}" class="media-object" width="30"/></a>
            <div class="media-body">
                <h4 class="media-heading">{{$one['username']}} <small>{{format_date($one['pubtime'])}}</small></h4><p>{!! $one['comment'] !!}</p>
                <form method="post" action="comment">
                    <input type="hidden" name="_token" value="{{ csrf_token() }}">
                    <input type="hidden" name="fcomment_id" value="{{$one['comment_id']}}">
                    <input type="hidden" name="art_id" value="{{ $detail->art_id }}">
                    <input class="h-block repcomment{{$one['comment_id']}}"  required="" type="text" name="comment" placeholder="请输入..." style="width: 80%">
                    <button style="padding: .78571429em 1.5em;border: none;background-color: #00a0e9;color: #fff;" type="submit">评论</button>
                </form>
                @if(isset($one['sub']))
                    @foreach($one['sub'] as $two)
                    <div class="media">
                        <a href="#" class="pull-left"><img src="/storage/{{$two['face']}}" class="media-object" width="30"/></a>
                        <div class="media-body">
                            <h4 class="media-heading">{{$two['username']}} <small>{{format_date($two['pubtime'])}}</small></h4><p>{!! $two['comment'] !!}</p>
                            <a href="javascript:;" title="为此评论点赞" style="color:#ada5a5;font-size: 16px;" onclick="dianzan(this,{{$two['comment_id']}},'{{csrf_token()}}')"><i class="icon ion-thumbsup"></i> <span class="rezan">{{$two['zan']}}</span></a>
                            <a href="javascript:;" title="回复 {{$two['username']}}" style="color:#ada5a5;font-size: 16px;" onclick="$('.repcomment{{$one['comment_id']}}').val('@'+'{{$two['username']}}# ');$('.repcomment{{$one['comment_id']}}').focus();"><i class="icon ion-ios-undo"></i></a>
                        </div>
                    </div>
                    @endforeach
                @endif
                <div class="h-clear"></div>
                <a href="javascript:;" title="为此评论点赞" style="color:#ada5a5;font-size: 16px;" onclick="dianzan(this,{{$one['comment_id']}},'{{csrf_token()}}')"><i class="icon ion-thumbsup"></i> <span class="rezan">{{$one['zan']}}</span></a>
            </div>
        </div>
        @endforeach

    </div>

    <div class="col-md-4 column">
        @include('layouts.homeinfosubscribe')

        <p class="h-block"><strong>文章归档</strong>
            <ul class="h-block">
            @foreach($file as $item)
                <li>{{$item->time}} &nbsp &nbsp &nbsp &nbsp ({{$item->num}}篇)</li>
            @endforeach
            </ul>
        </p>
        <div class="h-clear"></div>
        <p class="h-block"><strong>文章标签</strong>
        <ul class="h-block">
            <li id="tagbox">@foreach($tags as $k=>$v) <a href="" target="_blank">{{$v}}</a> @endforeach </li>
        </ul>
        </p>
        <div class="h-clear"></div>
        <p class="h-block"><strong>友情链接</strong>
        <ul class="h-block">
            <li><a href="https://www.zongscan.com" target="_blank" title="侯体宗的博客">侯体宗的博客</a></li>
            <li><a href="https://www.caofox.com" rel="nofollow" target="_blank">烟雨瑟瑟的博客</a></li>
            <li><a href="https://www.chinavipseo.com" rel="nofollow" target="_blank">南京优化包年</a></li>
            <li><a href="https://www.emdoorpda.com" target="_blank">三防加固笔记本</a></li>
            <li><a href="https://www.weijunip.com" rel="nofollow" target="_blank">湖南地标申请</a></li>
            <li><a href="https://www.lan2020.cn" rel="" target="_blank">澜溪博客</a></li>
            <li><a href="http://www.xinzhonghope.com/" target="_blank">心中hope</a></li>
            <li><a href="" target="_blank">友链位</a></li>
        </ul>
        </p>
    </div>
</div>

@endsection
@section('js')
@parent
@endsection







